I2C_open block

Short summary

Name

I2C_open

→POU type

→function

Category

more system blocks, blocks for I2C elements, block with internal error diagnostic

Graphical interface

Available since

version 1.13.0 (for Neuron Power Engineer) and version 2.3.901 of Neuron RTS max
(warning) This block is supported for →Raspberry Pi only.

Functionality

The block initializes a device file of the Linux "i2c-dev" driver for I/O operation.

For more information on the  die "i2c-dev" Modules see for example: https://www.kernel.org/doc/Documentation/i2c/dev-interface

Inputs, return value

 

Identifier

→Data type

Description

Inputs: 

bus_id

INT

the ID of the →I2C bus (0 = /dev/i2c-0, 1 = /dev/i2c-1, etc.)

Return value:

DINT

returns the file descriptor for subsequent I2C I/O operations

Input EN and output ENO are available when →calling the block. See "Execution control: EN, ENO" for information on input EN and output ENO.

See:

Internal error diagnostic for block

See "System_open block". 

Example for usage within ST-editor

At present, there is no example.